%{
    ( _arg ) &&  ( _name = _arg);
        _showError=_showError?_showError:true;
        _showLabel=_showLabel?_showLabel:true;
    if(!_valueProperty)
        _valueProperty = 'id';
    if(_dicName){
         String[] arr = _dicName.tokenize('.');
        if(arr.size()>1){
            dicElements = framework.utils.DicUtil.getAllByDicName(arr[0],_dicName);
        }else{
            dicElements = framework.utils.DicUtil.getAllByDicName(_dicName);
        }
    }
    if(!_filter){
        _filter ="";
    }
     
    play.templates.TagContext.current().data.put("selected", _value);
    
    serializedAttrs  = play.templates.FastTags.serialize(_attrs,"label","class","name", "items", "labelProperty", "value", "valueProperty","blank","blankTitle","dicName","optionAttr","optionLabel","required","filter","id").raw();
}%
    #{if _showLabel==true}
    <label>${_label?_label+"：":""}</label>
    #{/if}
    <select class="form-control form-control-select ${_class}" id="${_id}" name="${_name}" ${serializedAttrs}>
     #{if _blank} <option value="">${_blankTitle}</option>#{/if}
    #{doBody /}
    #{list items:_items, as:'i'}
       #{if  _filter.indexOf((_valueProperty && i.hasProperty(_valueProperty) ? i[_valueProperty]+"" : i+""))==-1}
        <option ${_optionAttr&&i.hasProperty(_optionAttr)?(_optionLabel?_optionLabel:"")+"='"+i[_optionAttr]+"'":""}  value="${_valueProperty && i.hasProperty(_valueProperty) ? i[_valueProperty] : i}" ${(_valueProperty && i.hasProperty(_valueProperty) ? i[_valueProperty].toString() : i.toString())==(_value+"")?"selected='selected'":""} >${_labelProperty && i.hasProperty(_labelProperty) ? play.utils.HTML.htmlEscape(i[_labelProperty]) : i}</option>
        #{/if}
     #{/list}
  
    #{list items:dicElements, as:'k'}
        #{if _filter=="" ||_filter.indexOf(k?.key)==-1}
        <option value="${k?.key}" ${k?.key==(_value+"")?"selected='selected'":""}>${k?.value}</option>
        #{/if}
   
    #{/list}
    </select>